Component({
  data: {
    selected: 0,
    color: "#9b9b9b",
    selectedColor: "#ffffff",
    list: [
      {
      pagePath: "/pages/index/index",
      iconPath: "/image/icon_component.png",
      selectedIconPath: "",
      isshow:false,
      text: "首页"
    },
    {
      pagePath: "/pages/friends/index",
      iconPath: "",
      selectedIconPath: "",
      isshow:false,
      text: "朋友"
    },
    {
      pagePath: "/pages/release/index",
      iconPath: "/image/nav-bar/release.png",
      selectedIconPath: "/image/nav-bar/release.png",
      isshow:true,
      text: ""
    },
    {
      pagePath: "/pages/message/index",
      iconPath: "",
      selectedIconPath: "",
      isshow:false,
      text: "消息"
    },
    {
      pagePath: "/pages/me/index",
      iconPath: "",
      selectedIconPath: "",
      isshow:false,
      text: "我"
    }
  ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})